package com.flowerSystem.mapper;

import com.flowerSystem.entity.Productinformation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.flowerSystem.pojo.ProductInformationCollection;
import com.flowerSystem.pojo.ProductinformVo;
import com.flowerSystem.pojo.ProductinformationPojo;
import com.flowerSystem.pojo.ProductinformationVo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import javax.swing.text.html.parser.Entity;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 鲜花遇上牛战士
 * @since 2023-08-28
 */
@Mapper
public interface ProductInformationMapper extends BaseMapper<Productinformation> {
    @Update("update productinformation set flower_name=#{flowerName},price=#{price}," +
            "flower_language=#{flowerLanguage},img=#{img}," +
            "hot=#{hot},order_count=#{orderCount},discribe=#{discribe}," +
            "product_information_status=#{productInformationStatus}," +
            "product_type_id=#{productTypeId},amount=#{amount} where id=#{id}")
    boolean updateProductById(Productinformation productinformation);

    Page<ProductinformationPojo> productInformByNameType(ProductinformVo productinformVo);


    ProductinformationVo productInformSingle(int id);

    Page<Productinformation> productInformSelectAll();

}


   
